package com.yequan;

import java.math.BigDecimal;

/**
 * qian
 *
 * @author yequan
 * @date 2020/12/11 17:06
 **/
public class PriceDemo {


    public static void main(String[] args) {
        double totalPrice = ServeFeeUtil.getTotalPrice((float) (72.13 * 100));
        System.out.println(BigDecimal.valueOf(totalPrice).intValue());

        System.out.println(BigDecimal.valueOf(72.13 * 100).intValue());

        if (7213 > BigDecimal.valueOf(72.13 * 100).intValue()){
            System.out.println("iiiiiiiiii");
        }
    }

    private static void originalPrice(){
        BigDecimal upPrice = new BigDecimal("107.84");
        BigDecimal driverReceived = new BigDecimal("90.9");
        BigDecimal serveFee = upPrice.subtract(driverReceived);
        float value = new BigDecimal("59.2").subtract(serveFee).floatValue();
        System.out.println(value);
    }

    private static void upPrice(){
        BigDecimal upPrice = new BigDecimal("107.84");
        BigDecimal driverReceived = new BigDecimal("90.9");
        BigDecimal serveFee = upPrice.subtract(driverReceived);
        double originalPrice = ServeFeeUtil.getOriginalPrice(upPrice.multiply(BigDecimal.valueOf((long) 100)).floatValue());

    }

}
